package com.zy.springcloudprovider.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @program: spring-cloud
 * @className: UserController.java
 * @description:
 * @author: ZY
 * @create: 2020年11月14日 18:44
 **/

@RestController
@RequestMapping("/user")
public class UserController {

    @GetMapping("/getUser")
    public Map<String, Object> getUser() {
        System.out.println("消费者调用生产者服务成功");
        return new HashMap<String, Object>(2){{
            put("name", "张三");
            put("age", 18);
        }};
    }



}
